﻿using HK.Core.Common.Data;
using HK.Editor.GUIEx.Protocol.Data;
using HK.Editor.GUIEx.Protocol.TreeView.Data;
using HK.Editor.GUIEx.Protocol.Window;
using HK.Editor.GUIEx.Window;

namespace HK.Editor.Network.Download.Protocol.Window
{
    
    /// <summary>
    /// 列定义 - 下载验证TableTree视图
    /// </summary>
    internal enum DownloadVerifyColumns
    {
        /// <summary>
        /// Id
        /// </summary>
        Id,
        /// <summary>
        /// 宏名
        /// </summary>
        Name,
        /// <summary>
        /// Android
        /// </summary>
        Crc,
        /// <summary>
        /// iOS
        /// </summary>
        Size,
        /// <summary>
        /// Pc
        /// </summary>
        Progress,
        /// <summary>
        /// 操作方式
        /// <para>* 删除+修正</para>
        /// </summary>
        Operation
    }
    
    /// <summary>
    /// 排序选项 - 下载验证TableTree视图
    /// </summary>
    public enum DownloadVerifySortOption
    {
        /// <summary>
        /// Id
        /// </summary>
        Id,
        /// <summary>
        /// 宏名
        /// </summary>
        Name,
        /// <summary>
        /// Android
        /// </summary>
        Crc,
        /// <summary>
        /// iOS
        /// </summary>
        Size
    }
    
    /// <summary>
    /// 宏编辑状态
    /// </summary>
    public enum DownloadVerifyState
    {
        /// <summary>
        /// 闲置
        /// </summary>
        Idle,
        
        /// <summary>
        /// 下载中
        /// </summary>
        Downloading
    }
    
    /// <summary>
    /// 接口 : 下载验证窗口
    /// </summary>
    /// <typeparam name="TWin">窗体类型</typeparam>
    /// <typeparam name="TConf">窗体配置类型</typeparam>
    /// <typeparam name="TData">窗体数据类型</typeparam>
    /// <typeparam name="TBranch">树枝类型</typeparam>
    public interface IDownloadVerifyWindow<TWin, TConf, out TData, TBranch> : IMultiColsWindow<TWin, TConf, TData>
        where TWin : WindowBase, IMultiColsWindow<TWin, TConf, TData>
        where TConf : JsonData, IWindowConf
        where TData : JsonData, IWindowData
        where TBranch : ITreeBranch
    {
        /// <summary>
        /// 下载状态
        /// </summary>
        DownloadVerifyState State { get; }
    }
}
